The present invention involves a method for communicating a host computer to a peripheral device, and specifically, a method for configuring a USB (Universal Serial Bus) device to a USB host.
The Universal Serial Bus (USB) is intended to be in an industry-standard extension to the PC architecture that is designed to support data exchange between a host computer and a wide range of simultaneously accessible peripherals. The attached peripherals share USB bandwidth through a host-scheduled, token-based protocol. The bus allows peripherals to be attached, configured, used, and detached while the host and other peripherals are in operation.
The USB connects USB devices with the USB host. Standard USB devices include USB hub devices, USB peripheral devices and USB peripheral devices that are also USB hub devices. The USB physical interconnect is a tiered star topology. A USB hub is at the center of each star. Each USB wire segment is a point-to-point connection between the host and the hub or peripheral, or a hub connected to another hub or peripheral. There is only one host in any USB system. The USB interface to the host computer system is referred to as the host controller, where the host controller may be implemented in a combination of hardware, firmware, or software. A root hub is integrated within the host system to provide one of more USB attachment points.
USB hubs provide additional attachment points to the USB system. USB peripherals provide capabilities to the system, such as a keyboard, monitor, printer, etc.
USB hubs are wiring concentrators and enable the multiple attachment characteristics of the USB. Attachment points are referred to as ports. Each hub converts a single attachment point into multiple attachment points. The USB architecture supports concatenation of multiple hubs. The upstream port of a hub connects the hub towards the host, while each downstream port of a hub allows connection to another hub or peripheral. Hubs can detect attachments and detachments at each downstream port and enable the distribution of power to the downstream devices.
A USB peripheral is able to transmit or receive data or control information over the bus. A peripheral is typically implemented with a USB cable that plugs into a USB port on a USB hub. However, a physical package may implement multiple peripherals and an embedded hub with a single USB cable. This is known as a compound device, which appears to the host as a USB hub with one or more non-removable USB devices.
Each peripheral contains configuration information that describes its capabilities and resource requirements to the USB host. Before a peripheral can be used, it must first be configured by the host. This configuration includes allocating USB bandwidth in selecting function-specific configuration options. To assist the host in identifying and configuring such USB peripherals, each peripheral carries and reports configuration-related information to the USB host. Some of the information reported is common among all logical devices, while other information is specific to the functionality provided by the particular USB peripheral.
USB devices (peripherals and/or hubs) report their attributes to the USB host using descriptors. A descriptor is a data structure with a defined format and describes general information to the USB host about the attached USB device. It includes information that applies globally to the USB device and all of the device""s configurations. Fields included within the standard device descriptor will include a Product ID assigned by the manufacturer (xe2x80x9cidProductxe2x80x9d), a Vendor ID assigned by USB (xe2x80x9cidVendorxe2x80x9d), an index to a String Descriptor which describes the manufacturer (xe2x80x9ciManufacturerxe2x80x9d), an index to a String Descriptor describing the product (xe2x80x9ciProductxe2x80x9d) and an index to a String Descriptor describing the device""s serial number (xe2x80x9ciSerialNumberxe2x80x9d). For more detailed information on the Universal Serial Bus refer to the Universal Serial Bus Revision 2.0 specification, available on-line at www.usb.org/developers/docs.html.
Presently, USB can support up to 127 devices on a single bus. Therefore, multiple printers of the same model may be attached to a single USB. It is desirable, therefore, to have such printers identify themselves over the USB so that the user can select which of the printers is to be used for a particular printer job. While the serial number may be a conventional way to identify the printer to the user, such a number might not be easily understandable by the user or to other users that may use the system at a later time. Furthermore, adding the serial number to the printer involves another step in the manufacturing process, which may undesirable increase the costs and complexity of the printer.
Accordingly, there is a need to provide a easy and convenient way for a user to incorporate multiple peripheral devices (such as printers) into a USB system where such multiple USB devices are easily identifiable by the user.
The present invention provides a method for communicating a host computer to a peripheral device; and more particularly, a method for configuring a USB device (such as a USB printer) to a USB host device (such as a PC). One advantageous feature that the method of the present invention provides is that it allows the USB host to identify between multiple USB devices; and therefore, allows the user to easily identify and select from between multiple of USB connected devices.
A specific feature of the present invention allows the user to enter a user-defined description for the USB device the first time the USB device is plugged into the host computer. The identification could be the serial number or a descriptive string, such as xe2x80x9cprinter on the shelf.xe2x80x9d The identification is preferably stored in non-volatile memory in the USB device, either in flash memory or EEPROM. This non-volatile memory is initialized during manufacturing of the USB device in a manner such that the USB host driver knows that the user has not assigned an identification string to the USB device the first time it is connected to the USB host. Upon initial communication with the USB device, the USB host driver will prompt the user for an identification string. The driver may also provide a method for changing the identification string if, for example, the user moves the xe2x80x9cprinter on the shelfxe2x80x9d from the shelf to another part of his or her office such as a desk.
As an alternative to storing the identification string on the USB device, the USB device could send any unique identifier to USB host and the USB host could then associate the user assigned string with the USB device""s unique identifier. One source of unique identification numbers available to a printer is a temperature sensor, such as a Dallas Semiconductor(copyright) sensor commonly used in Lexmark(copyright) Ink Jet Printers. The number provided by the sensor would be meaningless to the USB host unless it was first associated with some other identifier. The USB host could prompt for an identifier as soon as an unknown printer was connected to the USB system. The device driver for the printer would present a prompt to the user, such as xe2x80x9center an identification string for the printer that was just connected to the USB.xe2x80x9d If multiple unknown USB printers are detected at system boot, the device driver for the printers could ask that all but one of the printers be disconnected and then sequentially reconnected one-at-a-time while their respective identifiers are entered.
Another possible source of a unique identifier on a USB printer is in the printhead memory module. The printhead memory module may be written with the date of manufacture and could also contain a value that is incremented for each printhead manufactured on a given day. This combination of the date and daily build number would create a unique identifier.
Accordingly, it is one aspect of the present invention to provide a method for communicating a host computer to a peripheral device that includes the steps of: (a) coupling the peripheral devices to the host computer; (b) transmitting a unique identification code from the peripheral device to the host computer; (c) accessing from memory by the host computer an identification string corresponding to the unique identification code, the identification string being previously entered by a user of the host computer during an initialization process for the peripheral device; and (d) displaying at least a portion of the identification string on a user interface of the host computer, where the user may select the peripheral devices by activating an item (such as an icon, menu item, link, etc.) associated with the portion of the identification string displayed on the user interface.
This unique identification code could be a serial number taken from a component of the peripheral device, such as a printhead installed in a printer or a heat sensor installed in a printer. This unique identification code may also be calculated according to some random number generation scheme. For example, a time lapse between power application to the peripheral device and a second, user initiated event detected by the peripheral device can provide a number of sufficient randomness for use as the unique identification code. This second, user initiated event could be a user activating a power-on-switch on the peripheral device or some other switch on the peripheral device, such as activating a form feed button on a printer.
The method may also include the steps of, prior to the step of transmitting unique identification code from the peripheral device to the host computer: (i) testing, by the peripheral device, a location assigned for the unique identification code in a nonvolatile memory of the peripheral devices; (ii) upon determining that the assigned location includes a predefined invalid identification code, generating the unique identification code by the peripheral device; and (iii) placing the unique identification code in the assigned location of the nonvolatile memory by the peripheral devices. As discussed above, the step of generating the unique identification code may include a step of taking a serial number from a component of the peripheral device, or the steps of calculating the unique identification code according to a time lapse between the first event in a peripheral device and a second, user initiated event detected by the peripheral device.
With the above method, the initialization process preferably includes the steps of: (1) transmitting a unique identification code from the peripheral device to the host computer; (2) checking, by the host computer, for an identification string corresponding to the unique identification code in a memory of the host computer; (3) responsive to not finding an identification string corresponding to the unique identification code in the checking step, prompting a user to enter into the host computer an identification string corresponding to the peripheral devices (such as xe2x80x9cprinter on shelfxe2x80x9d); and (4) storing at least a portion of the identification string entered by the user into the memory of the host computer and corresponding the portion of the identification string stored into the memory with the unique identification code.
This step of prompting the user to enter into the host computer an identification string may include the step of providing a suggested identification string by the host computer to the user. This suggested identifier string could include a product name, a product type or class, and/or at least a portion of the unique identification code (such as the serial number).
It is a further aspect of the present invention to provide a method for communicating a unique identification number from a peripheral device to a host computer that includes the steps of: (a) copying at least a portion of a serial number from a component in the peripheral device; and (b) transmitting the copied portion of the component serial number to the host computer. Preferably, this method includes the step of storing the copied portion of the component serial number in a nonvolatile memory of the peripheral device, and the transmitting step includes the step of accessing the copied portion of the component serial number from the nonvolatile memory. In one embodiment, the peripheral device may be a printer and the component may be a printhead or a sensor contained in the printer.
It is yet another aspect of the present invention to provide a method for communicating an identification number from a peripheral device to a host computer that includes the steps of: (a) measuring a time lapse between a first event in the peripheral devices and a second, user-initiated event detected by the peripheral device; (b) calculating an identification number from the measured time lapse; and (c) transmitting the identification number from the peripheral device to the host computer. This first event may be power application to the peripheral device and the second, user initiated event may include the step of a user activating a power-on switch on the peripheral device. Another example of a second, user initiated event could be when a user activates a form feed switch on a printer.
It is yet another aspect of the present invention to provide a method for configuring a USB device to a USB host that comprises the steps of: (a) operatively coupling the USB device to the USB host with at least one USB connection; (b) responsive to a USB host device descriptor request to the USB device, the USB device transmitting a unique identification code in a serial-number field of a device descriptor response to the USB host device; (c) accessing from memory an identification string corresponding to the unique identification code, the identification string being previously entered by a user; and (d) displaying at least a portion of the identification string on a user interface operatively coupled to the USB host device along with an item, for activation by a user, from which the user may select the USB device. This unique identification code may be, for example, a serial number taken from a component of the USB device or calculated from a time lapse between a first event in the USB device and a second, user initiated event detected by the USB device.
This method may also include the steps of, prior to the step of transmitting a unique identification code in a serial number field of a device descriptor response to the USB host device: (1) testing, by the USB device, a location assigned for the unique identification code in a nonvolatile memory of the USB device; (2) upon determining that the assigned location includes a pre-defined invalid identification code, generating the unique identification code by the USB device; and (3) placing the unique identification code in the assigned location of the nonvolatile memory by the USB device.
In the above method, the identification string may be provided by a user during an initialization process for the USB device, where the initialization process includes the steps of: (1) transmitting a unique identification code from the USB device to the USB host; (2) checking, by the USB host, for an identification string corresponding to the unique identification code in a memory accessible by the USB host; (3) responsive to not finding an identification string corresponding to the unique identification code in the checking step, prompting a user to enter into a user interface an identification string corresponding to the USB device; and (4) storing at least a portion of the identification string entered by the user into the memory accessible by the USB host and corresponding the portion of the identification string stored into the memory with the unique identification code.
It is yet another aspect of the present invention to provide a method for configuring a USB device to a USB host that includes the steps of: (a) operatively coupling the USB device to the USB host with at least one USB connection; and (b) responsive to the USB host descriptor request to the USB device, the USB device copying at least a portion of a serial number from a component in the USB device, and transmitting the copied portion of the component serial number in a serial number field of a device descriptor response to the USB host. This method may also include the step of storing the copied portion of the component serial number in a nonvolatile memory of the USB device, where the step of transmitting the copied portion of the component serial number in a serial number field of a device descriptor response to the USB host may include the step of accessing the copied portion of the component serial number from the nonvolatile memory of the USB device.
It is yet another aspect of the present invention to provide a method for configuring a USB device to a USB host that includes the steps of: (a) operatively coupling the USB device to the USB host with at least one USB connection; and (b) responsive to a USB host descriptor request to the USB device, the USB device performing the steps of: (1) measuring a time lapse between the first event in the USB device and a second, user-initiated event detected by the device; (2) calculating an identification number from the measured time lapse; and (3) transmitting the identification number in a serial number field of a device descriptor response to the USB host. This first event may be, for example, a power application to the USB device; and the user initiated event may be, for example, a step of a user activating a switch on the USB device (such as a power on switch or a form feed switch).
Therefore, it is an object of the present invention to provide a relatively simple and convenient method for a user to incorporate a peripheral device (such as a USB peripheral device) into a system (such as a USB system), where the peripheral device will include a user-defined identification string selectable by the user when the peripheral device is to be activated or selected. It is also an object of the present invention to provide a method for allowing a user to distinguish between multiple peripheral devices coupled to a single host, even when some of the multiple peripheral devices are identical (or nearly identical) devices. It is also an object of the present invention to provide a method for a peripheral device to generate a unique identification number or string, so as to allow a host device to differentiate the peripheral device from other peripheral devices coupled to the host. These and other objects and advantages of the present invention will be apparent from the following description, the attached drawings and the appended claims.